import request from '@/utils/request'

const BASE_URL = '/erp/api/export_history/'

export function Get() {
  return request({
    url: BASE_URL,
    method: 'get'
  })
}

export function Post(id) {
  return request({
    url: `${BASE_URL}${id || ''}`,
    method: 'post'
  })
}

export function Delete(id) {
  return request({
    url: `${BASE_URL}${id || ''}`,
    method: 'delete'
  })
}

export function showUploadHistory(args) {
  return request({
    url: `/erp/api/upload_history/${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function showUploadBatch(id, args) {
  return request({
    url: `/erp/api/upload_batch/${id || ''}${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function deleteUploadBatch(id, args) {
  return request({
    url: `/erp/api/upload_batch/${id || ''}`,
    method: 'delete'
  })
}
